package anthology.daily_question._24_12;
//https://leetcode.cn/problems/determine-color-of-a-chessboard-square/description/?envType=daily-question&envId=2024-12-09
public class _1812判断国际象棋棋盘中一个格子的颜色 {
    public boolean squareIsWhite(String coordinates) {
        return ((coordinates.charAt(0) - 'a' + 1) + (coordinates.charAt(1) - '0')) % 2 == 1;
    }

    public boolean squareIsWhite2(String s) {
        return s.charAt(0) % 2 != s.charAt(1) % 2;
    }
}
